<template>
    <div id="AsnDetail">
        <div class="detail">
            <component :inputData="detailData" :is="currentComponent"></component>
        </div>
    </div>

</template>

<script>
    import detail from "commons/Detail";
    import navMenu from "commons/NavMenu";
    import baseMixin from "@/mixins/BaseMixin";

    export default {
        name: "Detail",
        mixins: [baseMixin],
        data() {
            return {
                newFlag: true,
                selectData: {},
                detailData: {
                    orderNumber: "",
                    orderQty: "",
                    rtxexternaltype: "",
                    userid: "",
                    modifiedon: "",
                    interactionid: ""
                },
                detailNav: "1",
                temporary: {},
                componentConfig: [
                    {
                        name: "GatherDetail",
                        label: this.$t('common.info'),
                        component: () => import('./page/particulars.vue')
                    },
                ]
            }
        },
        computed: {
            currentComponent() {
                return this.componentConfig[this.detailNav - 1].component;
            }
        },
        methods: {},
        mounted() {
            this.selectData = this.$store.state.routeData;
            this.detailData = {
                interactionid: this.selectData.interactionid,
                orderNumber: this.selectData.orderNumber,
                orderQty: this.selectData.orderQty,
                rtxexternaltype: this.selectData.rtxexternaltype,
                userid: this.$Cookies.get('user'),
                modifiedon: new Date().getTime(),
                rtxiswcstask: this.selectData.rtxiswcstask,
                rtxwavetype: this.selectData.rtxwavetype,
                orderqtymin: this.selectData.orderqtymin,
                orderqtymax: this.selectData.orderqtymax,
                orderlinemin: this.selectData.orderlinemin,
                orderlinemax: this.selectData.orderlinemax
            }
        },
        components: {
            "v-detail": detail,
            "v-navMenu": navMenu,
        },

    }
</script>

<style scoped>

</style>
